<%@page import="itpenguin.common.Util"%>
<%@page import="java.util.Iterator"%>
<%@page import="itpenguin.entities.Content"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.LinkedList"%>
<%@page import="itpenguin.entities.Series"%>
<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<nav>
	<a href="/">TOP</a>
	<%
	Map<String, Series> dic = (Map<String, Series>)application.getAttribute("seriesDictionary");
	Content currentCt = (Content)request.getAttribute("article");
	LinkedList<Series> serieseTree = new LinkedList<Series>();
	if (currentCt.getParentId() != null)
	{
		Series currentSr = Util.GetSeries(currentCt.getParentId());
		while(currentSr != null)
		{
			serieseTree.add(currentSr);
			if (currentSr.getParentId() == null) {
				currentSr = null;
			} else {
				currentSr = Util.GetSeries(currentSr.getParentId());
			}
		}
	}
	
	Iterator<Series> breadCrumbIterator = serieseTree.descendingIterator();
	pageContext.setAttribute("breadCrumbIterator", breadCrumbIterator);
	%>
	<c:forEach var="series" items="${breadCrumbIterator}">
		&gt;&nbsp;<a href="/${series.contextName}/${series.id}">${series.title}</a>&nbsp;
	</c:forEach>
</nav>
<div id="search" style="float:right;">
	<form action="http://www.google.co.jp/cse" id="cse-search-box">
	  <div>
	    <input type="hidden" name="cx" value="partner-pub-2855357403949640:hc6y8s-h3co" />
	    <input type="hidden" name="ie" value="UTF-8" />
	    <input type="text" name="q" size="31" />
	    <input type="submit" name="sa" value="&#x691c;&#x7d22;" />
	  </div>
	</form>
	<script type="text/javascript" src="http://www.google.co.jp/cse/brand?form=cse-search-box&amp;lang=ja"></script> 
</div>
  